package il.ac.biu.cs.grossmm.api.server;

/**
 * Thrown when server object with a specified hint is not a service but is used
 * in a context which requires a service
 */
public class NotAServiceException extends Exception {

	/**
	 * 
	 */
	private static final long serialVersionUID = 7552103546232558994L;

	/**
	 * Constructs a NotAServiceException with no detailed reason
	 * 
	 */
	public NotAServiceException()
	{
	}

	public NotAServiceException(String message, Throwable cause)
	{
		super(message, cause);
	}

	/**
	 * Constructs a NotAServiceException with a detailed reason
	 * 
	 * @param message
	 *            detailed reason
	 */
	public NotAServiceException(String message)
	{
		super(message);
	}

	/**
	 * Constructs a NotAServiceException with a cause
	 * 
	 * @param cause
	 *            the cause of this exception
	 */
	public NotAServiceException(Throwable cause)
	{
		super(cause);
	}

	/**
	 * Constructs a NotAServiceException with a hint specified
	 * 
	 * @param serviceHint
	 *            the hint used in a context where sevice hint was reuqied
	 */
	public NotAServiceException(Object serviceHint)
	{
		super(serviceHint.toString());
	}
}
